<!-- FILE:templates/apps/new.html -->
<script src="/javascripts/upload.js" type="text/javascript"></script>
<!--Body content-->
<div id="content" class="clearfix">
    <div class="contentwrapper"><!--Content wrapper-->
        <!-- Build page from here: -->
        <div class="row-fluid">
        {% set app_page_title="Upload an Application" %}
        {% if standalone_app_page %}
            <div class="page-header">
                <h1>{{ app_page_title }}</h1>
            </div><!--close header-->
        {% endif %}
          <div class="well">
          {% if can_upload_apps %}
            <form action="/apps/new" class="edit_app" enctype="multipart/form-data" id="edit_app" method="post">
              {% if success_message %}
              <h3>
                <ul id="noticeExplanation"><li class="flash notice">{{ success_message }}</li></ul>
              </h3>
              {% endif %}
              {% if error_message %}
              <h3>
                <ul id="errorExplanation"><li class="flash error">{{ error_message }}</li></ul>
              </h3>
              {% endif %}
              <div id="help-text"><h3>How to Upload Applications</h3>
              This page allows you to upload applications to AppScale.
              Applications must be in either the .zip format or the
              .tar.gz format. To package your application, run
              <em>"tar --exclude='app.tar.gz' -czvf app.tar.gz *"</em>
              in the directory containing the application's app.yaml
              file (for Python, Go, or PHP) or the WAR directory (for
              Java).
              </div>
              <br />
              <p>
                <input accept="tar.gz, tgz, zip" id="app_file_data" name="app_file_data" size="30" type="file" />
                <img alt="Spinner" id="spinner" src="/images/spinner.gif?1363364452" style="display:none;" />
              </p>
              <p>
                <input class="btn btn-primary" id="upload-button" name="commit" onclick="uploading();" type="submit" value="Upload" />
              </p>
            </form>
          {% else %}
            <h2>You do not have permission to upload applications. Please contact your cloud administrator.</h2>
          {% endif %}
          </div><!--close well-->
        </div> <!-- end row fluid -->
    </div> <!-- end content wrapper -->
</div> <!--end content-->
